#{extends 'main.html' /} #{set title:'department' /}

<div class="fields">

#{form @departments.save(), id:'createForm'}

<table>

	<tr>
		<td class="field"><input type="hidden" name="department.id"
			value="${department?.id}" /></td>
		<span class="error">${errors.forKey('department.id')}</span>
	</tr>
	
	<tr>
		<td class="label">Department Name:</td>
		<td class="field"><input type="text" name="department.name"
			value="${department?.name}" /></td>
		<td><span class="error">${errors.forKey('department.name')}</span></td>
	</tr>

	<tr>
		<td class="label">Address:</td>
		<td class="field"><input type="text" name="department.address"
			value="${department?.address}" /></td>
		<td><span class="error">${errors.forKey('department.firstName')}</span></td>
	</tr>
	
	<tr>
		<td class="label">Department Manager:</td>
		<td class="field"><input type="text" name="department.departmentManager"
			value="${department?.departmentManager}" /></td>
		<td><span class="error">${errors.forKey('department.departmentManager')}</span></td>
	</tr>
	
</table>
</div>
<input type="submit" name="submit" value="Save" />
<a href="@{departments.index}">Cancel</a>
#{/form}